#set(jstree = true)

#@mgtlayout()
#define main()


<div class="r-row r-rsps g-box">
  <div class="r-col-3">
    <div class="menu-col menu-col-left">
      <span class="menu-root menu-root-clicked">菜单管理</span>
      <div class="menu-leaf" id="menuTree"></div>
    </div>
  </div>
  <div class="r-col-9">
    <div class="menu-col menu-col-right">
      <div class="inner-container inner-button inner-inline">
        <a id="btnAddModule" class="menu-button">添加模块</a>
        <a id="btnAddApp" class="menu-button">添加应用程序</a>
      </div>
      <div class="inner-container inner-form inner-none">
        <div class="inner-toolbar">
          <div class="inner-form-title"></div>
          <div class="inner-form-button">
          </div>
        </div>
        <div class="inner-container inner-view inner-none">
          <form id="frmMenuView">
            <div class="r-row r-rsps">
              <div class="r-col-6">
                <div class="r-label">名称</div>
                <input type="text" class="r-ui" id="txtName" name="name" data-r-opts="{readonly:true}">
              </div>
              <div class="r-col-6">
                <div class="r-label">编号</div>
                <input type="text" class="r-ui" id="txtCode" name="code" data-r-opts="{readonly:true}">
              </div>
            </div>
            <div class="r-row r-rsps">
              <div class="r-col-6">
                <div class="r-label">路径</div>
                <input type="text" class="r-ui" id="txtPath" name="path" data-r-opts="{readonly:true}">
              </div>
              <div class="r-col-6">
                <div class="r-label">类型</div>
                <input type="text" class="r-ui" id="txtType_CH" name="type_ch" data-r-opts="{readonly:true}">
              </div>
            </div>
            <div class="r-row r-rsps">
              <div class="r-col-6">
                <div class="r-label">状态</div>
                <input type="text" class="r-ui" id="txtEnabled_CH" name="enabled_ch" data-r-opts="{readonly:true}">
              </div>
              <div class="r-col-6">
                <div class="r-label">显隐</div>
                <input type="text" class="r-ui" id="txtVisible_CH" name="visible_ch" data-r-opts="{readonly:true}">
              </div>
            </div>
            <div class="r-row r-rsps">
              <div class="r-col-6">
                <div class="r-label">图标</div>
                <input type="text" class="r-ui" id="txtIcon" name="icon" data-r-opts="{readonly:true}">
              </div>
              <div class="r-col-6">
                <div class="r-label">排序</div>
                <input type="text" class="r-ui" id="txtSort_ID" name="sort_id" data-r-opts="{readonly:true}">
              </div>
            </div>
            <div class="r-row r-rsps">
              <div class="r-col-6">
                <div class="r-label">菜单类型</div>
                <input type="text" class="r-ui" id="menu_type" name="menu_type_ch" data-r-opts="{readonly:true}">
              </div>
              <div class="r-col-6">
                <div class="r-label">非普通菜单编号</div>
                <input type="text" class="r-ui" id="menu_code" name="menu_code" data-r-opts="{readonly:true}" >
              </div>
            </div>
            <div class="r-row r-rsps">
              <div class="r-col-12">
                <div class="r-label">备注</div>
                <input type="text" class="r-ui" id="txtNote" name="note" data-r-opts="{readonly:true}">
              </div>

            </div>
          </form>
        </div>
        <div class="inner-container inner-edit inner-none">
          <form id="frmMenuEdit">
            <input type="hidden" name="id" id="menuIdEdit"/>
            <input type="hidden" name="pid" id="menuPidEdit"/>
            <div class="r-row">
              <div class="r-col-6">
                <div class="r-label">名称</div>
                <input type="text" class="r-ui" id="txtName_Edit" name="name" >
              </div>
              <div class="r-col-6">
                <div class="r-label">编号</div>
                <input type="text" class="r-ui" id="txtCode_Edit" name="code" >
              </div>
            </div>
            <div class="r-row">
              <div class="r-col-6">
                <div class="r-label">路径</div>
                <input type="text" class="r-ui" id="txtPath_Edit" name="path" >
              </div>
              <div class="r-col-6">
                <div class="r-label">类型</div>
                <input type="picker" class="r-ui" id="prkMenuType" name="type" >
              </div>
            </div>
            <div class="r-row">
              <div class="r-col-6" id="divIsEnabled">
                <input id="rdoIsEnabled" type="radiolist" name="enabled" class="r-ui" data-r-opts="{dataSource:[{text:'启用',value:'1'},{text:'禁用',value:'0'}]}">
              </div>
              <div class="r-col-6" id="divIsVisible">
                <input id="rdoIsVisible" type="radiolist" name="visible" class="r-ui" data-r-opts="{dataSource:[{text:'显示',value:'1'},{text:'隐藏',value:'0'}]}">
              </div>
            </div>
            <div class="r-row">
              <div class="r-col-6">
                <div class="r-label">图标</div>
                <input type="text" class="r-ui" id="txtIcon_Edit" name="icon" >
              </div>
              <div class="r-col-6">
                <div class="r-label">排序</div>
                <input type="text" class="r-ui" id="txtSort_ID_Edit" name="sort_id" >
              </div>
            </div>
            <div class="r-row">
              <div class="r-col-6">
                <div class="r-label">菜单类型</div>
                <input type="picker" class="r-ui" id="menu_types" name="menu_type" data-r-opts="{defaultText:'普通菜单',defaultValue:'ORDINARYMENU'}">
              </div>
              <div class="r-col-6">
                <div class="r-label">非普通菜单编号</div>
                <input type="text" class="r-ui" id="menu_codes" name="menu_code" >
              </div>
            </div>
            <div class="r-row">
              <div class="r-col-12">
                <div class="r-label">备注</div>
                <input type="text" class="r-ui" id="txtNote_Edit" name="note" >
              </div>

            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
#end

#define css()
<style>
  .menu-root{
    font-weight: bold;
    color: #676a6c;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    padding: 5px 10px;
    margin-left: -5px;
  }

  .menu-root:hover {
    background-color: #e7f4f9;
    cursor: pointer;
  }

  .menu-root-clicked{
    background: #beebff;
    box-shadow: inset 0 0 1px #999;
  }

  .menu-leaf {
    margin-left: 15px;
    margin-top: 2px;
  }

  .menu-col {
    border: solid 1px #c5c5c5;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    padding: 10px;
  }

  .menu-col-left {
    margin-right: -25px;
    overflow-y: auto;
    overflow-x: auto;
  }

  .col-resize {
    margin-right: 0px!important;
  }

  .menu-col-right {
    margin-left: 0px;
    overflow-y: auto;
    position: relative;
  }

  .menu-button {
    border: solid 1px #1ab394;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    padding: 20px;
    text-shadow: 0px 0px 3px #a0a0a0;
    background-color: #1ab394;
    color: #FFFFFF;
    font-size: 20px;
    margin: 5px;
    display: inline-block;
  }

  .menu-button:hover {
    color: #FFFFFF;
    border-color: #a99f9a;
    background-color: #a99f9a;
  }

  .inner-view, .inner-edit {
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .inner-form-title {
    font-size: 16px;
    height: 22px;
    line-height: 22px;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid;
    text-shadow: 0px 0px 3px #000000;
    margin-top: 5px;
    margin-bottom: 15px;
    display: inline-block;
  }

  .inner-toolbar {
    border-bottom: solid 1px #c5c5c5;
    margin-bottom: 15px;
  }

  .inner-form-button {
    display: inline-block;
    float: right;
  }

  .inner-inline {
    display: inline-block;
  }

  .inner-block {
    display: block;
  }

  .inner-none {
    display: none;
  }
</style>
#end

#define js()
#(yx.js("/script/pc/sysmgt/infrastructure/menu/index.js"))
#end
